package com.oauth.components.client.ui.footer;

import com.google.gwt.event.dom.client.ClickEvent;
import com.google.gwt.event.dom.client.ClickHandler;
import com.google.gwt.user.client.ui.Button;
import com.google.gwt.user.client.ui.DialogBox;
import com.google.gwt.user.client.ui.Frame;
import com.google.gwt.user.client.ui.VerticalPanel;

public class FeedbackDialog extends DialogBox {

	public static final String FEEDBACK_DOC_URL = "https://spreadsheets1.google.com/embeddedform?formkey=dHgzS2p0X0wyTVQ4VjE1MnRXblVxUnc6MQ";

	public FeedbackDialog() {
		setText("Feedback");
		setAnimationEnabled(true);
		setGlassEnabled(true);
		VerticalPanel vPanel = new VerticalPanel();
		Frame iFrame = new Frame(FEEDBACK_DOC_URL);
		iFrame.setSize("760", "638");
		iFrame.getElement().setAttribute("frameborder", "0");
		vPanel.add(iFrame);
		Button ok = new Button("OK");
		ok.addClickHandler(new ClickHandler() {

			@Override
			public void onClick(ClickEvent pArg0) {
				hide();
			}
		});
		vPanel.add(ok);
		vPanel.setCellHorizontalAlignment(ok, VerticalPanel.ALIGN_CENTER);

		setWidget(vPanel);
	}
}
